package org.feifei.user.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.feifei.basic.util.PageList;
import org.feifei.user.domain.User;
import org.feifei.user.domain.WxUser;
import org.feifei.user.query.UserQuery;
import org.feifei.user.query.WxUserQuery;
import org.feifei.user.service.WxUserService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author forever
 * @Description: 微信用户后台的管理
 * @date 2021/12/14 18:03
 */
@RestController
@Api("用户管理")
@RequestMapping("wxUser")
public class WxUserController {

    @Resource
    private WxUserService wxUserService;

    /**
     * 高级查询，分页查询，条件查询
     * @param query 高级查询类 UserQuery
     * @return
     */
    @ApiOperation(value = "根据查询条件", notes = "包含了分页查询，高级查询")
    @PostMapping("/list")
    public PageList<List<WxUser>> listByPage(@RequestBody WxUserQuery query) {
        return wxUserService.listByPage(query);
    }
}
